<template>
    <item
        :labelWidth="labelWidth"
        :help="help"
        :required="required"
        :label="label">
        <upload 
            :showImage="showImage"
            :model-value="modelValue" 
            @update:modelValue="$emit('update:modelValue', $event)"/>
    </item>
</template>
<script>
import item from './item.vue'
import upload from '../upload.vue'
export default {
    props: {
        // 标签名称
        label: {
            type: String,
            default: ''
        },
        // 标签宽度
        labelWidth: {
            type: String,
            default: '120px'
        },
        // 帮助信息，显示在左侧label旁边出现一个帮助图标
        help: {
            type: String,
            default: ''
        },
        // 是否显示必填的红色星号*
        required: {
            type: Boolean,
            default: false
        },
        // 是否显示图片信息
        showImage: {
            type: Boolean,
            default: false,
        },
        // 绑定的输入值信息
        modelValue: {
            type: [String, Number, Boolean, Array, Object, null],
            default: ''
        },
    },
    components: {
        item,
        upload,
    },
}
</script>